<%@ page import="minusjudge.Submission" %>



<div class="fieldcontain ${hasErrors(bean: submissionInstance, field: 'contestant', 'error')} required">
	<label for="contestant">
		<g:message code="submission.contestant.label" default="Contestant" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="contestant" name="contestant.id" from="${minusjudge.Contestant.list()}" optionKey="id" required="" value="${submissionInstance?.contestant?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: submissionInstance, field: 'date', 'error')} required">
	<label for="date">
		<g:message code="submission.date.label" default="Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="date" precision="day"  value="${submissionInstance?.date}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: submissionInstance, field: 'fileName', 'error')} ">
	<label for="fileName">
		<g:message code="submission.fileName.label" default="File Name" />
		
	</label>
	<g:textField name="fileName" value="${submissionInstance?.fileName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: submissionInstance, field: 'language', 'error')} required">
	<label for="language">
		<g:message code="submission.language.label" default="Language" />
		<span class="required-indicator">*</span>
	</label>
	<g:field name="language" type="number" value="${submissionInstance.language}" required=""/>
</div>

<div class="fieldcontain ${hasErrors(bean: submissionInstance, field: 'memoryUsed', 'error')} required">
	<label for="memoryUsed">
		<g:message code="submission.memoryUsed.label" default="Memory Used" />
		<span class="required-indicator">*</span>
	</label>
	<g:field name="memoryUsed" type="number" value="${submissionInstance.memoryUsed}" required=""/>
</div>

<div class="fieldcontain ${hasErrors(bean: submissionInstance, field: 'problem', 'error')} required">
	<label for="problem">
		<g:message code="submission.problem.label" default="Problem" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="problem" name="problem.id" from="${minusjudge.Problem.list()}" optionKey="id" required="" value="${submissionInstance?.problem?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: submissionInstance, field: 'rootPath', 'error')} ">
	<label for="rootPath">
		<g:message code="submission.rootPath.label" default="Root Path" />
		
	</label>
	<g:textField name="rootPath" value="${submissionInstance?.rootPath}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: submissionInstance, field: 'status', 'error')} required">
	<label for="status">
		<g:message code="submission.status.label" default="Status" />
		<span class="required-indicator">*</span>
	</label>
	<g:field name="status" type="number" value="${submissionInstance.status}" required=""/>
</div>

<div class="fieldcontain ${hasErrors(bean: submissionInstance, field: 'timeElapsed', 'error')} required">
	<label for="timeElapsed">
		<g:message code="submission.timeElapsed.label" default="Time Elapsed" />
		<span class="required-indicator">*</span>
	</label>
	<g:field name="timeElapsed" type="number" value="${submissionInstance.timeElapsed}" required=""/>
</div>

